package javaApi.uploadFile;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;

import java.io.IOException;
import java.net.URI;

public class HadoopUploadFile {
    public static void main(String[] args) throws IOException {

        String uri = args[0];
        Configuration conf = new Configuration();
        FileSystem fs = FileSystem.get(URI.create(uri), conf);
        Path src = new Path("input/t_log.txt");
        Path dest_src = new Path("/user/niit");
        fs.copyFromLocalFile(src, dest_src);

    }
}
